/*
  流式布局
  会自动换行的
 */

import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: "Haha",
      home: Scaffold(
        appBar: AppBar(
          title: Text('Wrap'),
        ),
        body: Container(
          child: Wrap(
            spacing: 5.5,
            runSpacing: 8.8,
            children: [
              // Chip 是标签类，还有几个子类可以使用
              Chip(label: Text('好物'), backgroundColor: Colors.deepOrange),
              Chip(label: Text('王者荣耀'), backgroundColor: Colors.blue),
              Chip(label: Text('钉钉'), backgroundColor: Colors.amber),
              Chip(label: Text('肥宅快乐水'), backgroundColor: Colors.green),
              Chip(label: Text('元神'), backgroundColor: Colors.cyan),
              Chip(label: Text('小王子'), backgroundColor: Colors.pink),
              Chip(label: Text('湖人总冠军'), backgroundColor: Colors.green),
              Chip(label: Text('看着我别说话'), backgroundColor: Colors.lightBlue),
              Chip(label: Text('什么值得买'), backgroundColor: Colors.pinkAccent),
            ],
          ),
        ),
      ),
    );
  }

}